package Controls;

import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public class InternetAdapter extends BaseAdapter {
	private Context context;	
//	private Activity m_activity;
	//private boolean m_isTuyenBus;
	private List<InternetVO> listTurn;

	public InternetAdapter(Context context, List<InternetVO> listTurn){// Activity activity, boolean isTuyenBus) {
		this.context = context;
		this.listTurn = listTurn;		
//		m_activity = activity;
//		m_isTuyenBus = isTuyenBus;/
	}

	public Object getItem(int position) {
		return listTurn.get(position);
	}

	public long getItemId(int position) {
		return position;
	}

	public View getView(int position, View view, ViewGroup viewGroup) {
		InternetVO entry = listTurn.get(position);
		return new InternetAdapterView(context, entry);
	}

	public int getCount() {
		// TODO Auto-generated method stub
		if(listTurn==null)
			return 0;
		return listTurn.size();
			
	}
}
